﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MotionPlanning.MotionPlanningPrimitives;

namespace MotionPlanning.MotionPlanningAlgorithms.ioRRT_Prototype
{
    class Node_ioRRT : Node
    {
        private int n_children;
        private bool beingDrained;
        new static public Node_ioRRT SpawnGraphicNode()
        {
            return new Node_ioRRT();
        }

        private Node_ioRRT():
            base()
        {
            beingDrained = false;
            n_children = 0;
        }
        public void MarkAsDrained()
        {
            beingDrained = true;
        }

        public bool isDrained()
        {
            return beingDrained;
        }

        public void childNumberUp()
        {
            n_children++;
        }

        public void childNumberDown()
        {
            n_children--;
        }

        public bool IsLeafNode()
        {
            if (n_children <= 0)
                return true;
            else
                return false;
        }
    }
}
